package com.xiaoc.bulldozer.common.service.impl;

import java.util.List;
import java.util.Date;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.xiaoc.bulldozer.common.dao.BannerMapper;
import com.xiaoc.bulldozer.common.dto.BannerQueryDto;
import com.xiaoc.bulldozer.common.model.Banner;
import com.xiaoc.bulldozer.common.service.BannerService;

/**
 * Banner Service 实现类
 * 
 * @author Danfo Yam
 * 
 * @date 2018-12-05 13:49:33
 */
@Service("bannerService")
public class BannerServiceImpl implements BannerService {

    @Resource
    private BannerMapper bannerMapper;

    @Override
    public Integer getBannerCountByCondition(BannerQueryDto bannerQueryDto) {
        return bannerMapper.getBannerCountByCondition(bannerQueryDto);
    }

    @Override
    public List<Banner> getBannerListByCondition(BannerQueryDto bannerQueryDto) {
        return bannerMapper.getBannerListByCondition(bannerQueryDto);
    }

    @Override
    public Banner getBannerById(Integer id) {
        return bannerMapper.getBannerById(id);
    }

    @Override
    public List<Banner> getAllBannerList() {
        return bannerMapper.getAllBannerList();
    }
    
    @Override
    public void save(Banner banner) {
        bannerMapper.save(banner);
    }

    @Override
    public void update(Banner banner) {
        bannerMapper.update(banner);
    }

    @Override
    public void deleteById(Integer id) {
        bannerMapper.deleteById(id);
    }

}
